package model.sequent.tokens;

/**
 * Represents the smallest expression in a sequent. An atom has a name and represents some proposition.
 * 
 * @author Karen Berntsen (s0815799)
 * @author Erik Stens (s0615374)
 */
public class Atom implements Expression {
	private String	name;
	
	public Atom(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	@Override
	public String toString() {
		return name;
	}
	
	@Override
	public int hashCode() {
		return name.hashCode();
	}
	
	@Override
	public boolean equals(Object o) {
		if (o instanceof Atom) {
			Atom atom = (Atom) o;
			return name.equals(atom.getName());
		}
		return false;
	}
	
	@Override
	public Atom clone() {
		return this;
	}
}
